/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.palituxd.tools.eval;

import javax.swing.text.JTextComponent;

/**
 *
 * @author pablojesus
 */
public class Evaluador {

    public static boolean estaVacio(JTextComponent jTextComponent) {
        boolean vacio = false;
        if (jTextComponent == null) {
            vacio = true;
        } else {
            String trim = jTextComponent.getText().trim();
            vacio = trim.isEmpty();
        }
        return vacio;
    }

    public static boolean estaVacio(String valor) {
        if (valor == null) {
            return true;
        } else {
            return valor.trim().isEmpty();
        }

    }
}
